_wwww_cccc_ssss_tttt_oooo_llll, _wwww_cccc_ssss_tttt_oooo_uuuu_llll, _wwww_cccc_ssss_tttt_oooo_llll_llll, _wwww_cccc_ssss_tttt_oooo_uuuu_llll_llll - convert wide character string to
long integer, unsigned long integer, long long integer, unsigned long
The _wwww_cccc_ssss_tttt_oooo_llll, _wwww_cccc_ssss_tttt_oooo_uuuu_llll, _wwww_cccc_ssss_tttt_oooo_llll_llll, and _wwww_cccc_ssss_tttt_oooo_uuuu_llll_llll functions convert the initial
portion of the wide character string pointed to by _n_p_t_r to _llll_oooo_nnnn_gggg _iiii_nnnn_tttt,
The subject sequence is defined as the longest initial subsequence of the
input wide character string, starting with the first non-white-space
wide-character code, that is of the expected form. The subject sequence
contains no wide-character codes if the input wide character string is
empty or consists entirely of white-space wide-character code, or if the
first non-white-space wide-character code is other than a sign or a
permissible letter or digit.
If the subject sequence has the expected form and _b_a_s_e is 0, the sequence
of wide-character codes starting with the first digit is interpreted as
an integer constant. If the subject sequence has the expected form and
the value of _b_a_s_e is between 2 and 36, it is used as the base for
conversion, ascribing to each letter its value as given above. If the
subject sequence begins with a minus sign, the value resulting from the
conversion is negated. A pointer to the final wide character string is
stored in the object pointed to by _e_n_d_p_t_r, provided that _e_n_d_p_t_r is not a
null pointer.
If the subject sequence is empty or does not have the expected form, no
conversion is performed; the value of _n_p_t_r is stored in the object
pointed to by _e_n_d_p_t_r, provided that _e_n_d_p_t_r is not a null pointer.
RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS
Upon successful completion, _wwww_cccc_ssss_tttt_oooo_llll, _wwww_cccc_ssss_tttt_oooo_llll_llll, _wwww_cccc_ssss_tttt_oooo_uuuu_llll, and _wwww_cccc_ssss_tttt_oooo_uuuu_llll_llll return
the converted value, if any. If no conversion could be performed, 0 is
returned and _e_r_r_n_o may be set to indicate the error. If the correct
value is outside the range of representable values, {LONG_MAX},
{ULONG_MIN}, or {ULONGLONG_MIN} is returned (according to the sign of the
value and which version of the routine is called--signed or unsigned),
and _e_r_r_n_o is set to [ERANGE].
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
_wwww_cccc_ssss_tttt_oooo_llll, _wwww_cccc_ssss_tttt_oooo_llll_llll, _wwww_cccc_ssss_tttt_oooo_uuuu_llll, and _wwww_cccc_ssss_tttt_oooo_uuuu_llll_llll will fail if:
[EINVAL] The value of _b_a_s_e is not supported.
[ERANGE] The value to be returned is not representable.
_wwww_cccc_ssss_tttt_oooo_llll, _wwww_cccc_ssss_tttt_oooo_llll_llll, _wwww_cccc_ssss_tttt_oooo_uuuu_llll, and _wwww_cccc_ssss_tttt_oooo_uuuu_llll_llll may fail if:
Because 0, {LONG_MIN}, {LONGLONG_MIN}, {ULONG_MIN}, {ULONGLONG_MIN},
{LONG_MAX}, {LONGLONG_MAX}, {ULONG_MAX}, and {ULONGLONG_MAX}, are
returned on error and are also valid returns on success, an application
wishing to check for error situations should set _e_r_r_n_o to 0, then call
_wwww_cccc_ssss_tttt_oooo_llll, _wwww_cccc_ssss_tttt_oooo_llll_llll, _wwww_cccc_ssss_tttt_oooo_uuuu_llll, or _wwww_cccc_ssss_tttt_oooo_uuuu_llll_llll, then check _e_r_r_n_o and if it is 0,